﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Text;

namespace WebApplication.Controllers
{
    public class QuavioController : Controller
    {
        protected internal JsonpResult Jsonp(object data)
        {
            return Jsonp(data, null);
        }

        protected internal JsonpResult Jsonp(object data, string callback)
        {
            return Jsonp(data, callback);
        }

        protected internal JsonpResult Jsonp(object data, string callback, string contentType)
        {
            return Jsonp(data, callback, contentType, null);
        }

        protected internal virtual JsonpResult Jsonp(object data, string callback, string contentType, Encoding contentEncoding)
        {
            return new JsonpResult
            {
                Data = data,
                ContentType = contentType,
                ContentEncoding = contentEncoding,
                Callback = callback
            };
        }

    }
}
